import request from '@/utils/request'
export function getannouncement(params) {
  return request({
    url: '/announcement/list/',
    method: 'get',
    params:params
  })
}
export function updateannouncement(data){
  return request({
    url:'/announcement/',
    method:'put',
    data:data
  })
}
export function getannouncementinfo(id){
  return request({
    url:'/announcement/' + id,
    method:'get',
  })
}

export function announcementuploadImg(img) {
  const formData = new FormData()
  formData.append('img',img)
  return request({
    url: '/announcement/announcementupload',
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data: formData
  })
}